package demo

import (
    "fmt"
    "io/ioutil"

    aepapi "gitee.com/dell_software_department/ctwing_sdk/apis/Aep_software_upgrade_management"
)

func OperationalSoftwareUpgradeTask_Demo() {
    resp, err := aepapi.OperationalSoftwareUpgradeTask("dFI1lzE0EN2", "xQcjrfNLvQ", "cd35c680b6d647068861f7fd4e79d3f5", "{}")

    if err != nil {
        fmt.Println("OperationalSoftwareUpgradeTask err:", err)
        return
    }
    fmt.Println("code:", resp.StatusCode, "\nerr:", err)
    bodyStr, err1 := ioutil.ReadAll(resp.Body)
    if err1 != nil {
        fmt.Println("ioutil.ReadAll err:", err1)
        return
    }
    fmt.Println(string(bodyStr))

    defer resp.Body.Close()
}
func QuerySoftwareUpgradeSubtasks_Demo() {
    resp, err := aepapi.QuerySoftwareUpgradeSubtasks("dFI1lzE0EN2", "xQcjrfNLvQ", "", "10015488", "", "", "", "", "cd35c680b6d647068861f7fd4e79d3f5")

    if err != nil {
        fmt.Println("QuerySoftwareUpgradeSubtasks err:", err)
        return
    }
    fmt.Println("code:", resp.StatusCode, "\nerr:", err)
    bodyStr, err1 := ioutil.ReadAll(resp.Body)
    if err1 != nil {
        fmt.Println("ioutil.ReadAll err:", err1)
        return
    }
    fmt.Println(string(bodyStr))

    defer resp.Body.Close()
}
func QuerySoftwareUpgradeTask_Demo() {
    resp, err := aepapi.QuerySoftwareUpgradeTask("dFI1lzE0EN2", "xQcjrfNLvQ", "", "10015488", "cd35c680b6d647068861f7fd4e79d3f5")

    if err != nil {
        fmt.Println("QuerySoftwareUpgradeTask err:", err)
        return
    }
    fmt.Println("code:", resp.StatusCode, "\nerr:", err)
    bodyStr, err1 := ioutil.ReadAll(resp.Body)
    if err1 != nil {
        fmt.Println("ioutil.ReadAll err:", err1)
        return
    }
    fmt.Println(string(bodyStr))

    defer resp.Body.Close()
}
func CreateSoftwareUpgradeTask_Demo() {
    resp, err := aepapi.CreateSoftwareUpgradeTask("dFI1lzE0EN2", "xQcjrfNLvQ", "cd35c680b6d647068861f7fd4e79d3f5", "{}")

    if err != nil {
        fmt.Println("CreateSoftwareUpgradeTask err:", err)
        return
    }
    fmt.Println("code:", resp.StatusCode, "\nerr:", err)
    bodyStr, err1 := ioutil.ReadAll(resp.Body)
    if err1 != nil {
        fmt.Println("ioutil.ReadAll err:", err1)
        return
    }
    fmt.Println(string(bodyStr))

    defer resp.Body.Close()
}
func ModifySoftwareUpgradeTask_Demo() {
    resp, err := aepapi.ModifySoftwareUpgradeTask("dFI1lzE0EN2", "xQcjrfNLvQ", "", "cd35c680b6d647068861f7fd4e79d3f5", "{}")

    if err != nil {
        fmt.Println("ModifySoftwareUpgradeTask err:", err)
        return
    }
    fmt.Println("code:", resp.StatusCode, "\nerr:", err)
    bodyStr, err1 := ioutil.ReadAll(resp.Body)
    if err1 != nil {
        fmt.Println("ioutil.ReadAll err:", err1)
        return
    }
    fmt.Println(string(bodyStr))

    defer resp.Body.Close()
}
func ControlSoftwareUpgradeTask_Demo() {
    resp, err := aepapi.ControlSoftwareUpgradeTask("dFI1lzE0EN2", "xQcjrfNLvQ", "", "cd35c680b6d647068861f7fd4e79d3f5", "{}")

    if err != nil {
        fmt.Println("ControlSoftwareUpgradeTask err:", err)
        return
    }
    fmt.Println("code:", resp.StatusCode, "\nerr:", err)
    bodyStr, err1 := ioutil.ReadAll(resp.Body)
    if err1 != nil {
        fmt.Println("ioutil.ReadAll err:", err1)
        return
    }
    fmt.Println(string(bodyStr))

    defer resp.Body.Close()
}
func DeleteSoftwareUpgradeTask_Demo() {
    resp, err := aepapi.DeleteSoftwareUpgradeTask("dFI1lzE0EN2", "xQcjrfNLvQ", "", "10015488", "", "cd35c680b6d647068861f7fd4e79d3f5")

    if err != nil {
        fmt.Println("DeleteSoftwareUpgradeTask err:", err)
        return
    }
    fmt.Println("code:", resp.StatusCode, "\nerr:", err)
    bodyStr, err1 := ioutil.ReadAll(resp.Body)
    if err1 != nil {
        fmt.Println("ioutil.ReadAll err:", err1)
        return
    }
    fmt.Println(string(bodyStr))

    defer resp.Body.Close()
}
func QuerySoftwareUpradeDeviceList_Demo() {
    resp, err := aepapi.QuerySoftwareUpradeDeviceList("dFI1lzE0EN2", "xQcjrfNLvQ", "", "10015488", "", "", "", "cd35c680b6d647068861f7fd4e79d3f5", "", "", "", "")

    if err != nil {
        fmt.Println("QuerySoftwareUpradeDeviceList err:", err)
        return
    }
    fmt.Println("code:", resp.StatusCode, "\nerr:", err)
    bodyStr, err1 := ioutil.ReadAll(resp.Body)
    if err1 != nil {
        fmt.Println("ioutil.ReadAll err:", err1)
        return
    }
    fmt.Println(string(bodyStr))

    defer resp.Body.Close()
}
func QuerySoftwareUpgradeDetail_Demo() {
    resp, err := aepapi.QuerySoftwareUpgradeDetail("dFI1lzE0EN2", "xQcjrfNLvQ", "", "10015488", "cd35c680b6d647068861f7fd4e79d3f5")

    if err != nil {
        fmt.Println("QuerySoftwareUpgradeDetail err:", err)
        return
    }
    fmt.Println("code:", resp.StatusCode, "\nerr:", err)
    bodyStr, err1 := ioutil.ReadAll(resp.Body)
    if err1 != nil {
        fmt.Println("ioutil.ReadAll err:", err1)
        return
    }
    fmt.Println(string(bodyStr))

    defer resp.Body.Close()
}
func QuerySoftwareUpgradeTaskList_Demo() {
    resp, err := aepapi.QuerySoftwareUpgradeTaskList("dFI1lzE0EN2", "xQcjrfNLvQ", "10015488", "", "", "cd35c680b6d647068861f7fd4e79d3f5", "")

    if err != nil {
        fmt.Println("QuerySoftwareUpgradeTaskList err:", err)
        return
    }
    fmt.Println("code:", resp.StatusCode, "\nerr:", err)
    bodyStr, err1 := ioutil.ReadAll(resp.Body)
    if err1 != nil {
        fmt.Println("ioutil.ReadAll err:", err1)
        return
    }
    fmt.Println(string(bodyStr))

    defer resp.Body.Close()
}
